﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using LM.Negocio.Objetos;

namespace LM.Repositorios.Maps
{
    public class OperadorMap : EntityTypeConfiguration<Operador>
    {
        public OperadorMap()
        {
            this.HasKey(m => m.Id);
            this.Property(m => m.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("Id");

            this.Property(c => c.Codigo).HasColumnName("Codigo").IsRequired();
            this.Property(c => c.Nome).HasColumnName("Nome").IsRequired();
            this.Property(c => c.Senha).HasColumnName("Senha").IsRequired();

            this.ToTable("OPERADOR");
        }
    }
}
